﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KnBinarySerializer
{
    internal interface IFormatter
    {
        /// <summary>
        /// 每一个都要自己的key,每一个都应不相等
        /// </summary>
        /// <returns></returns>
        byte GetKey();
        Type GetHandleType();

        bool IsFixLen();
        int WriteBytes(BianaySerializeManager serial,object obj);

        object ReadBytes(BianaySerializeManager serial,int maxLen, Type type);
    }

    internal interface IItemFormatter
    {
        void ReadBytes(BianaySerializeManager serial, int maxLen, object targetList);
    }
}
